package Day7;

public class Oblong extends Tu {
    private double a;
    private double b;

    public Oblong(double a, double b) {
        this.a = a;
        this.b = b;
    }

    public double getA() {
        return a;
    }

    public void setA(double a) {
        this.a = a;
    }

    public double getB() {
        return b;
    }
    public void setB(double b) {
        this.b = b;
    }

    public Oblong() {
    }



    @Override
    public double area() {
        System.out.print("长方形的面积是：");
        return a*b;
    }

    @Override
    public double perimeter() {
        System.out.print("长方形的周长是：");
        return (a+b)*2;
    }


}
